message when module is put on exclusive edit

I have a doubt, is possible for the DOORS to send a message when the module is open in "exclusive edit" or put on "exclusive edit"?
I wanna to know so i can make a message for when this event occour.
Bruwbruw - Wed May 02 06:41:04 EDT 2012

Re: message when module is put on exclusive edit
llandale - Wed May 02 12:07:52 EDT 2012

Triggers are tricky, but a post-module-open trigger could detect when the module is opened "edit", and then go from there.

If you really want to know who has opened modules "exclusive Edit", you can run a script to look at each module's "HistorySessions".

-Louie

Re: message when module is put on exclusive edit
Bruwbruw - Wed May 02 13:34:45 EDT 2012

llandale - Wed May 02 12:07:52 EDT 2012
Triggers are tricky, but a post-module-open trigger could detect when the module is opened "edit", and then go from there.

If you really want to know who has opened modules "exclusive Edit", you can run a script to look at each module's "HistorySessions".

-Louie

Okay, i get it...
I don't wanna know who open in "exclusive", i just wanna the user see a message that the module is in exclusive and he need to follow some procedure...
My problem is how to do it...
I have tried the this:

Trigger t2 = trigger("mod", module, pre ,open, 1, "For modify or/and create new requirement you need to create an EPR.")


or

 

Trigger t2 = trigger("mod", module, pre ,open, 1, WarningBox("For modify or/and create new requirement you need to create an EPR."))


or

 

 

Trigger t2 = trigger("mod", module, pre ,open, 1, "#include <BRAOLIVE\message.dxl>")



The trigger exists, when a run this script:



 

 

Trigger t
for t in current Module do
{
    ack name(t)
        ack dxl(t)
}



The trigger appear, and the message too. But when i open the module, its give me a error. Like the errors below:

-E- DXL: <Line:1> badly formed token (#include<C:/Documents)
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 2 errors and 0 warnings
-E- DXL: <Line:1> badly formed token (#include<Documents)
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 2 errors and 0 warnings
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 1 error and 0 warnings
-E- DXL: <Line:1> incorrectly concatenated tokens
-I- DXL: all done with 1 error and 0 warnings

What i don't get is what i'm doing wrong.
But, Thanks anyway.
=)



 

Re: message when module is put on exclusive edit
llandale - Wed May 02 14:49:31 EDT 2012

Bruwbruw - Wed May 02 13:34:45 EDT 2012

Okay, i get it...
I don't wanna know who open in "exclusive", i just wanna the user see a message that the module is in exclusive and he need to follow some procedure...
My problem is how to do it...
I have tried the this:

Trigger t2 = trigger("mod", module, pre ,open, 1, "For modify or/and create new requirement you need to create an EPR.")


or

 

Trigger t2 = trigger("mod", module, pre ,open, 1, WarningBox("For modify or/and create new requirement you need to create an EPR."))


or

 

 

Trigger t2 = trigger("mod", module, pre ,open, 1, "#include <BRAOLIVE\message.dxl>")



The trigger exists, when a run this script:



 

 

Trigger t
for t in current Module do
{
    ack name(t)
        ack dxl(t)
}



The trigger appear, and the message too. But when i open the module, its give me a error. Like the errors below:

-E- DXL: <Line:1> badly formed token (#include<C:/Documents)
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 2 errors and 0 warnings
-E- DXL: <Line:1> badly formed token (#include<Documents)
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 2 errors and 0 warnings
-E- DXL: <Line:1> syntax error
-I- DXL: all done with 1 error and 0 warnings
-E- DXL: <Line:1> incorrectly concatenated tokens
-I- DXL: all done with 1 error and 0 warnings

What i don't get is what i'm doing wrong.
But, Thanks anyway.
=)



 

//
/*
*/
string    DxlCode = "
Module mod = current
if (null mod or !isEdit(mod)) halt
warningBox(\"For modify or/and create new requirement you need to create an EPR.\")
"   // end definition of DxlCode
 
string  NameTrig = "WarnEPR"
if (confirm("Delete trigger " NameTrigg "??"))
{  delete (NameTrig, module, post, open, 7)
   if (confirm("Deploy trigger " NameTrig "??"))
      trigger(NameTrig, module, post, open, 7, DxlCode)
}


-Louie

Re: message when module is put on exclusive edit
Bruwbruw - Fri May 04 13:37:39 EDT 2012

llandale - Wed May 02 14:49:31 EDT 2012

//
/*
*/
string    DxlCode = "
Module mod = current
if (null mod or !isEdit(mod)) halt
warningBox(\"For modify or/and create new requirement you need to create an EPR.\")
"   // end definition of DxlCode
 
string  NameTrig = "WarnEPR"
if (confirm("Delete trigger " NameTrigg "??"))
{  delete (NameTrig, module, post, open, 7)
   if (confirm("Deploy trigger " NameTrig "??"))
      trigger(NameTrig, module, post, open, 7, DxlCode)
}


-Louie

I got it now.
In the end, i used this:
 

Trigger t
Module m = current
 
sFunction = "warningBox(\"For create or/and change a requirement you must open an EPR.\")"  
// end definition of DxlCode
 
string tName = "WarnEPR"
for t in m do{        
        if(name(t) == tName) delete(t)  
}
trigger(tName, module, pre ,open, 1,sFunction)

 


It's doing what i want.
Thanks for you help.
XD